<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<base href="<%=basePath%>">
<script type="text/javascript">
	function valid() {
		$("#help_name").val("英文");
		$("#div_name").removeClass("control-group error");
		$("#div_name").addClass("control-group");
		var name = $("#name").val().trim();
		if (name == "") {
			$("#div_name").removeClass("control-group");
			$("#div_name").addClass("control-group error");
			document.getElementById("help_name").innerHTML = "英文,函数名称不能为空";
			return false;
		}
		return true;
	}
	function goback() {
		history.go(-1);
	}
</script>
<div class="page-header">
	<h3 style="margin-top: auto">更新函数信息</h3>
</div>
<div class="row-fluid">
	<div>
		<form:form class="form-horizontal" method="POST"
			modelAttribute="method" onsubmit="return valid()">
			<%-- <div class="control-group">
				<label class="control-label">原始函数签名</label>
				<div class="controls">
					<form:input path="methodSigniture" class="input-xxlarge"
						readonly="true" />
				</div>
			</div> --%>
			<div class="control-group">
				<label class="control-label">返回类型</label>
				<div class="controls">
					<form:select path="returnType.id" items="${typeList}" />
				</div>
			</div>
			<div class="control-group" id="div_name">
				<label class="control-label">函数名称</label>
				<div class="controls">
					<form:hidden path="id" />
					<form:hidden path="cInterface.id" />
					<form:hidden path="cInterface.uri" />
					<form:input path="name" class="input-xxlarge" id="name" />
					<span class="help-inline" id="help_name">英文</span>
				</div>
			</div>
			<div class="control-group" id="div_signature">
				<label class="control-label">函数签名</label>
				<div class="controls">
					<form:input path="methodSigniture" class="input-xxlarge" id="methodSigniture" />
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">参数列表</label>
				<div class="controls">
					<form:input path="arguments" class="input-xxlarge" readonly="true"/>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">描述信息</label>
				<div class="controls">
					<form:textarea rows="3" path="description" class="input-xxlarge" />
				</div>
			</div>
			<div class="control-group">
				<div class="controls">
					<button type="submit" class="btn" id="submit"><i class="icon-ok"></i>&nbsp;提交</button>
					<button type="button" class="btn" style="margin-left:50ps;" onclick="goback()"><i class="icon-remove"></i>&nbsp;取消</button>
				</div>
			</div>
		</form:form>
	</div>
</div>
<!--/row-->